#include "Tile.h"

Tile::Tile(int x, int y, int w, int h, SDL_Surface *TileSheet, SDL_Rect *SheetLocation, std::string tiletype): Sprite(x, y, w, h, TileSheet)
{
	this->SheetLocation = SheetLocation;
	this->tiletype = tiletype;
}

Tile::Tile(): Sprite(0, 0, 0, 0, NULL)
{
	SheetLocation = NULL;
	/*SheetLocation.x = 0;
	SheetLocation.y = 0;
	SheetLocation.w = 0;
	SheetLocation.h = 0;*/
	tiletype = "empty";
}

void Tile::Render(void(*RenderFunction)(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip), SDL_Surface* destination)
{
	RenderFunction(x, y, sprite, destination, SheetLocation);
}
